package ApplicationStart.Controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.client.RestTemplate;


@Controller("Page")
@RequestMapping( value = "age")
public class PageController {

    private final RestTemplate restTemplate;

    @Autowired
    public PageController(RestTemplate restTemplate) {
        this.restTemplate = restTemplate;
    }

    @RequestMapping(value = "agedist", method = RequestMethod.GET)
    public String displayAgeDistirbute(Model model){
        // String url = "http://localhost:9082/ageDistribute";
        // List<Integer> ages = restTemplate.getForObject(url, List.class);
        // 处理如何分类
        return "agedistplot";
    }



}
